package com.topone.repository;


import com.topone.dataObject.TcCoupon;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 优惠券擦操作相关Dao
 * Created by Administrator on 2017/11/6,0006.
 */
@Repository
public interface TcCouponRepository extends JpaRepository<TcCoupon,String> {
    //根据商家id
    List<TcCoupon> findByBussinessIdEqualsAndCouponStatusEquals(String bussinessId, Integer couponStatus);

    List<TcCoupon> findByCouponStatus(Integer couponStatus);

    List<TcCoupon> findByCouponNameLikeAndCouponStatus(String name, Integer status);

    TcCoupon findByCouponCodeAndCouponStatus(String couponCode, Integer status);

}
